<template>
  <div class="vue-box sbot" >
    <!-- ------- 内容部分 ------- -->
    <div class="c-panel">
      <el-form v-if="m" :inline="true">
        <sa-info name="序号" br>{{ m.sort }}</sa-info>

        <sa-info type="img" name="用户头像" :value="m.avatar" br></sa-info>
        <sa-info name="用户昵称" :value="m.nickName" br></sa-info>
        <sa-info name="用户名" :value="m.name" br></sa-info>
        <sa-info name="联系方式" :value="m.phone" br></sa-info>
        <sa-info name="出生日期" :value="sa.forDate(m.birth, 'yyyy-MM-dd') || '无'" br></sa-info>
        <sa-info name="血型(xo)" :value="m.blood" type="enum" :jv="dims.BLOOD_TYPE" br></sa-info>
        <sa-info name="身高(/cm)" :value="m.height" br></sa-info>
        <sa-info name="体重(/kg)" :value="m.weight" br></sa-info>
        <sa-info name="邮箱" :value="m.email" br></sa-info>
        <sa-info type="enum" name="用户性别" :jv="dims.GENDER" :value="m.sex"></sa-info>
        <sa-info type="datetime" name="首次时间" :value="sa.forDate(m.firstUse, 2) || '无'" br></sa-info>
        <sa-info type="enum" name="启用状态" :jv="dims.YES_OR_NO" :value="m.status"></sa-info>
        <sa-info type="datetime" name="创建时间" :value="sa.forDate(m.createTime, 2) || '无'" br></sa-info>
        <sa-info name="个人简介" :value="m.note" br></sa-info>
      </el-form>
    </div>
  </div>
</template>

<script>
export default {
  name: 'bus-user-info',
  props: { param: Object },
  data() {
    return {
      id: this.param.id,
      dims: this.param.dims,
      sa: sa,
      m: {}
    }
  },
  created: function () {
    let gd = sa.$sys.getCurd()
    if (gd) {
      this.dims = gd
    } else {
      sa.error('未获取到字典信息！');
    }
    sa.ajax('/scs/user/getById', { id: this.id }, function (res) {
      this.m = res.data;
    }.bind(this), { type: "get" });
  },
  methods: {}
}
</script>

<style scoped>
.c-panel>>>.c-title {
  margin-bottom: 20px;
}

.c-panel>>>.c-item .c-label {
  width: 150px;
}

.c-panel>>>.c-item .el-input {
  width: 300px;
}

/* 链接样式  */
/*.my-link{position: relative; top: -1px; margin-left: 0.5em;}*/
</style>
